home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 2
/
Amoszine 2.adf
/
MORE_SOURCE_CODE
/
Circle.AMOS
/
Circle.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
476b
|
17 lines
'By Paul Overy (Optimised from a book)
'
_CIRCLE[100,100,64]
' Unlike the Amos circle routine this can be adapted for hundres of FX.
Procedure _CIRCLE[CX,CY,R]
' Draws a circle using only integers.
S=R : X=R : Y=0 : Add S,-2*X
While Y<=X
Plot CX+X,CY-Y : Plot ,CY+Y : Plot CX-X, : Plot ,CY-Y
Plot CX-Y,CY+X : Plot ,CY-X : Plot CX+Y, : Plot ,CY+X
Add S,2*Y+1 : Inc Y
If S>=0
Add S,-2*X+2
Dec X
End If
Wend
End Proc